/*! \file Device.h
 *	\brief <write description for Device.h>
 *
 *	created:	2009/11/13
 *	created:	13:11:2009   16:51
 *	filename: 	c:\src\main\libs\gd\Device.h
 *	file path:	c:\src\main\libs\gd
 *	file base:	Device
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _GD_DEVICE_H_
#define _GD_DEVICE_H_

#pragma once

#include <config/Configurable.h>
#include <core/noncopyable.h>
#include <core/SmartPtr.h>

namespace tt{
namespace gd{

class DeviceContext;
class Material;
class PrimitiveBuilder;
class ShaderBuilder;
class VertexShader;

class Device : NonCopyable
{
public:
	Device(void);
	virtual ~Device(void);

	void present();

	SharedPtr<DeviceContext> deviceContext();

	SharedPtr<PrimitiveBuilder> createPrimitiveBuilder();
	SharedPtr<ShaderBuilder> createShaderBuilder();

private:
	virtual void onPresent() = 0;

	virtual SharedPtr<DeviceContext> onDeviceContext() = 0;

	virtual SharedPtr<PrimitiveBuilder> onCreatePrimitiveBuilder() = 0;
	virtual SharedPtr<ShaderBuilder> onCreateShaderBuilder() = 0;
};

} //namespace gd
} //namespace tt

#endif //_GD_DEVICE_H_
